package com.itheima.jingjie.TreeSet集合;

public class Teacher {
    private String name;
    private double math;
    private double yuwen;
    private double yyu;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getMath() {
        return math;
    }

    public void setMath(double math) {
        this.math = math;
    }

    public double getYuwen() {
        return yuwen;
    }

    public void setYuwen(double yuwen) {
        this.yuwen = yuwen;
    }

    public double getYyu() {
        return yyu;
    }

    public void setYyu(double yyu) {
        this.yyu = yyu;
    }

    public Teacher() {
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", math=" + math +
                ", yuwen=" + yuwen +
                ", yyu=" + yyu +
                '}';
    }

    public Teacher(String name, double math, double yuwen, double yyu) {
        this.name = name;
        this.math = math;
        this.yuwen = yuwen;
        this.yyu = yyu;
    }

    public double sum() {
        return this.math + this.yuwen + this.yyu;
    }

}

